
<!-- Container -->
<div id="container">
	<div class="shell">

		<!-- Small Nav -->
		<div class="small-nav">
			<a href="#">Dashboard</a> <span>&gt;</span> Current Uploaded Files
		</div>
		<?php
		$label = 'Upload';
		include 'includes/message.php';
		?>
		<br />
		<!-- Main -->
		<div id="main">
			<div class="cl">&nbsp;</div>

			<!-- Content -->
			<div id="content">

				<!-- Box -->
				<div class="box" style="width: 1000px">
					<!-- Box Head -->
					<div class="box-head">
						<h2 class="left">
							Upload Files
							<h2>
								<!--
						<div class="right">
							<label>search Transaction</label>
							<input type="text" class="field small-field" />
							<input type="submit" class="button" value="search" />
						</div>
						-->
					
					</div>
					<!-- End Box Head -->

					<!-- Table -->




					<div class="table" style="width: 100%">

						<form action="<?php echo ADMINBASEURL."upload/do_upload/"; ?>"
							method="post" accept-charset="utf-8"
							enctype="multipart/form-data"
							onsubmit="return MyForm.validate(this);">
							<br> <b><h2>Select a File</h2> </b><br> <input type="file"
								name="userfile" size="20" id="file*" alt="Upload File" /> <br> <br>
							<b><h2>Remarks for this File</h2> </b> <br> <span class="req"></span>
							<textarea class="field size3" rows="5" style="width: 90%"
								name="commodity" id="commodity*" alt="Commodity">
								<?php echo isset($transactionDetails)?$transactionDetails->commodity:'';?>
							</textarea>

							<br /> <br /> <input type="submit" value="upload" /> <br /> <br />

						</form>

						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<th>Date/Time Uploaded</th>
								<th>File Name</th>
								<th>Remarks</th>
								<th>Action</th>
							</tr>

							<?php

							if(isset($uploadedFiles))
							foreach ($uploadedFiles->result() as $file)
							{
									
								echo
								"<tr>
									<td>".$file->createdon."
									<td>".$file->orig_name."</td>
									<td>".$file->remarks."</td>
									<td>
										<a href='".ADMINBASEURL."/upload/download/".$file->file_name."'>Download</a> | 
										<a href='".ADMINBASEURL."/upload/delete/".$file->id."'>Delete</a>
										</td>
									</td>
								</tr>";
							}
							?>
						</table>
						<?php

							
						include 'includes/pagination.php';
						?>

					</div>
					<!-- Table -->

				</div>
				<!-- End Box -->



			</div>
			<!-- End Content -->

			<!-- Sidebar -->
			<div id="sidebar">


				<!-- End Box -->
			</div>
			<!-- End Sidebar -->

			<div class="cl">&nbsp;</div>
		</div>
		<!-- Main -->
	</div>
</div>
<!-- End Container -->



